package com.zjr.utils;

import com.zjr.domain.User;

public class UserUtil {
	private static String[] department = {"技术部", "研发部", "人事部", "财务部", "行政部"};
	private static String[] position = {"员工", "部长", "总经理" , "管理员"};
	
	
	public static ViewUser change(User user){
		return new ViewUser
				(user.getUid(), user.getUsername(), user.getPassword(),
						department[user.getDid()-1], user.getPhone(), user.getAddress(), position[user.getRole()]);
	}
}
